package vo{
	import control.GameMachine;
	
	import flash.media.Sound;
	import flash.net.URLRequest;
	
	
	public class GameModel{
		
		public var gameCardsVO:GameCardsVO;
		public var cardMachine:GameMachine;
		public var cardList:Array;
		
		private static var instance:GameModel = null;
		private var turnUp:Sound;
		private var turnUrl:URLRequest;
		
		public function GameModel(){
			if(GameModel.instance != null){
				trace("单例模型能且紧能实例一次！");
			}
		}
		
		public static function getInstance():GameModel{
			if(GameModel.instance == null){
				instance = new GameModel();
			}
			return instance;
		}
		
		public function initData():void{
			gameCardsVO = new GameCardsVO();
			cardMachine = new GameMachine();
		}
		
		public function playMe(song:String):void{
			turnUp = new Sound();
			turnUrl = new URLRequest(song);
			turnUp.load(turnUrl);
			trace('playMe');
			turnUp.play();
		}
	}
}